﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <link href="Ext/resources/css/ext-all.css" rel="stylesheet" type="text/css" />
    <link href="css/CheckHeader.css" rel="stylesheet" type="text/css" />
    <link href="css/writer.css" rel="stylesheet" type="text/css" />
    <link href="Manager/css/style.css" rel="stylesheet" type="text/css" />
    <script src="Ext/ext-all.js" type="text/javascript"></script>
    <!--    <script src="Ext/bootstrap.js" type="text/javascript"></script>-->
    <script src="Ext/locale/ext-lang-zh_CN.js" type="text/javascript"></script>
    <script src="coreJs/BaseTree.js" type="text/javascript"></script>
    <script src="coreJs/Tree.js" type="text/javascript"></script>
    <script src="coreJs/PerTree.js" type="text/javascript"></script>
    <script src="coreJs/Grid.js" type="text/javascript"></script>
    <script src="coreJs/Form.js" type="text/javascript"></script>
    <script src="coreJs/MainApp.js" type="text/javascript"></script>
    <script src="Manager/Menu/Form.js" type="text/javascript"></script>
    <script src="coreJs/CmbData.js" type="text/javascript"></script>
    <script src="coreJs/CmbYesNo.js" type="text/javascript"></script>
    <script src="coreJs/CmbTree.js" type="text/javascript"></script>
    <script src="Common/CmbMonth.js" type="text/javascript"></script>
</head>
<body>
    <script type="text/javascript">
        var userName = Ext.util.Cookies.get("userName");
        if (userName == "" || userName == null) {
            window.location.href = "Manager/login.html";
        }

        Ext.Loader.setConfig({ enabled: true });
        Ext.Loader.setPath('Ext.ux', 'Ext/ux');
        Ext.Loader.setPath('SHApp', 'Manager');
        Ext.require([
            'Ext.grid.*',
            'Ext.data.*',
            'Ext.util.*',
            'Ext.Action',
            'Ext.tab.*',
            'Ext.button.*',
            'Ext.form.*',
            'Ext.form.field.Number',
            'Ext.form.field.Date',
            'Ext.layout.container.Card',
            'Ext.toolbar.Paging', //��ҳ��
            'Ext.ux.PreviewPlugin',
            'Ext.ux.data.PagingMemoryProxy', //���÷�ҳ���Ĳ���
            'Ext.ModelManager',
            'Ext.menu.*',
            'Ext.tip.QuickTipManager',
            'Ext.selection.CheckboxModel',
            'Ext.ux.CheckColumn'
        ]);

        Ext.onReady(function () {
            Ext.tip.QuickTipManager.init();
            var mApp = Ext.create('SH.Core.App', { renderTo: document.body });

            document.getElementById("divperson").innerHTML = "欢迎 " + userName;
        });
        function Tuichu() {
            Ext.util.Cookies.clear("userName");
            Ext.Ajax.request({
                method: "POST",
                url: "api/usercheck?format=json"
            })
            window.location.href = "Manager/login.html";
        }

        function sss(recordid, gridid) {
            var grid = Ext.getCmp(gridid);
            var chks = document.getElementsByName(recordid)
            var v=0;
            for (var i = 0; i < chks.length; i++) {
                var chk = chks[i];
                if (chk.checked) {
                    v += parseInt(chk.value);
                }
            }
            grid.addValue(recordid, v);
        }
        
    </script>
    <div id="topDiv">
        <div class="bh-zm-left">
        </div>
        <div class="bh-zm-right">
            <p>
                <label id="divperson">
                </label>
                | <a href="Manager/login.html">退出</a></p>
        </div>
    </div>
</body>
</html>
